package com.example.model.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails;

import java.io.Serializable;
import java.util.Collection;
import java.util.Date;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class UmsAdminVo implements Serializable, UserDetails {


    private static final long serialVersionUID=1L;

    /** id */
    private String id;

    /** 用户名 */
    private String username;

    /** 密码 */
    private String password;

    /** 账号是否过期：0->已锁定；1->未锁定 */
    private boolean isAccountNonExpired = true;

    /** 账户是否锁定：0->已锁定；1->未锁定 */
    private boolean isAccountNonLocked = true;

    /** 密码是否过期：0->已过期；1->未过期 */
    private boolean isCredentialsNonExpired = true;

    /** 账户是否可用：1->可用；0->禁用 */
    private boolean isEnabled = true;

    /** 头像 */
    private String icon;

    /** 邮箱 */
    private String email;

    /** 昵称 */
    private String nickName;

    /** 备注信息 */
    private String note;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date createTime;

    /** 修改时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date updateTime;
    /**
     * 权限列表
     */
    Collection<? extends GrantedAuthority> authorities;

    private Integer page;
    private Integer rows;

    /** 是否是管理员1不是2是 */
    private Integer adminiStrators;

}
